#ifndef ___ACTIVATION___
#define ___ACTIVATION___


#include <memory>
#include <vector>
#include <optional>
#include <cmath>  // For exp and log functions
#include "../../Tensor.hpp"
#include "Module.hpp"


namespace DimN {

    template<typename T = float>
    class Softmax : public Module<T> {
    private:
        int dim = 0;

    public:
        Softmax(_dim = 0) : dim(_dim) {}

        virtual Tensor<T> forward(const Tensor<T>& input) override {
            if (dim < 1) {
                throw std::runtime_error("Softmax dimension not specified");
            }
            return Tensor<T>();
        }

        virtual std::string to_string() const override {
            if (dim > 0) {
                return "Softmax(dim=" + std::to_string(dim.value()) + ")";
            }
            else {
                return "Softmax(dim=not specified)";
            }
        }
    };


};

#endif